package com.huawei.eidc.message.service;

import java.util.Map;

import org.apache.log4j.Logger;
import org.dom4j.Document;
import org.dom4j.Element;

import com.huawei.eidc.message.WSDLServiceImpl;

public interface WSDService {
	
	//webservice url
	public static final String $wsdl_url = "http://218.2.129.11:11070/ecagent/services/ECAgentService?wsdl";
	
	//xmlfile path
	public static final String reqXmlFilePath = "D:\\Developer\\Java\\WorkSpaceS\\Maven\\WorkSpace\\WebServices\\WebContent\\WEB-INF\\template\\";
	
	//设置测试用密钥
    public static final String TEST_KEY = "AD67EA2F3EE6E5AA";
    
    /**
	 * 读取xml模板文件
	 * @param filePath
	 * @return
	 * @throws Exception
	 */
	public abstract Document getReqXmlTemplate(String filePath);
    
	/**
	 * 发送请求
	 * @param reqXml
	 * @param method
	 * @return
	 */
	public abstract String requestSend(String reqXml ,String method);
	
    /**
     * 传入XML格式的文档对象，返回转换为UTF8格式的字符串
     * @param document Document XML格式的文档对象
     * @return String 转换为UTF8格式的字符串
     */
    public abstract String getXMLStr(Document document);
    
    /**
     * 加密body
     * @param map
     * @return	加密后的字符串
     */
    public abstract String setBody(Map<String, String> map);
    
    /**
     * 为节点添加子节点，以及为子节点赋值
     * @param element
     * @param map
     * @return
     */
    public abstract Element setElement(Element element , Map<String, String> map);
    
}
